package com.lanyuan.vo;

/**
 * 活动奖品等级枚举
 */
public enum PrizeLevel {

	ONE(1, "一等奖", "onejp", "onenum", "onenumber", "onegl"),

	TWO(2, "二等奖", "twojp", "twonum", "twonumber", "twogl"),

	THREE(3, "三等奖", "threejp", "threenum", "threenumber", "threegl"),

	FOUR(4, "四等奖", "fourjp", "fournum", "fournumber", "fourgl"),

	FIVE(5, "五等奖", "fivejp", "fivenum", "fivenumber", "fivegl");

	private int level; // 奖品等级
	private String jpjs;
	private String jp; // 奖品信息
	private String num; // 数量
	private String number; // 实际数量
	private String gl; // 概率

	// 构造方法
	private PrizeLevel(int level, String jpjs, String jp, String num, String number, String gl) {
		this.level = level;
		this.jpjs = jpjs;
		this.jp = jp;
		this.num = num;
		this.number = number;
		this.gl = gl;
	}

	// 普通方法
	public static String getJpjs(int level) {
		for (PrizeLevel c : PrizeLevel.values()) {
			if (c.getLevel() == level) {
				return c.jpjs;
			}
		}
		return null;
	}

	// 普通方法
	public static String getJp(int level) {
		for (PrizeLevel c : PrizeLevel.values()) {
			if (c.getLevel() == level) {
				return c.jp;
			}
		}
		return null;
	}

	// 普通方法
	public static String getNum(int level) {
		for (PrizeLevel c : PrizeLevel.values()) {
			if (c.getLevel() == level) {
				return c.num;
			}
		}
		return null;
	}

	// 普通方法
	public static String getNumber(int level) {
		for (PrizeLevel c : PrizeLevel.values()) {
			if (c.getLevel() == level) {
				return c.number;
			}
		}
		return null;
	}

	// 普通方法
	public static String getGl(int level) {
		for (PrizeLevel c : PrizeLevel.values()) {
			if (c.getLevel() == level) {
				return c.gl;
			}
		}
		return null;
	}

	public String getJpjs() {
		return jpjs;
	}

	public void setJpjs(String jpjs) {
		this.jpjs = jpjs;
	}

	public int getLevel() {
		return level;
	}

	public void setLevel(int level) {
		this.level = level;
	}

	public String getJp() {
		return jp;
	}

	public void setJp(String jp) {
		this.jp = jp;
	}

	public String getNum() {
		return num;
	}

	public void setNum(String num) {
		this.num = num;
	}

	public String getNumber() {
		return number;
	}

	public void setNumber(String number) {
		this.number = number;
	}

	public String getGl() {
		return gl;
	}

	public void setGl(String gl) {
		this.gl = gl;
	}

}
